﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DOMercury.Engine;
using DOMercury.Items;
using DOMercury.Interfaces;

namespace NirCmdPlugin
{
    public class DialogParamProvider: IParametersProvider
    {
        private List<IItem> parameters;
        public DialogParamProvider()
        {
            //Create list of Params here
            parameters = new List<IItem>();
            parameters.Add(new DialogClick("OK"));
            parameters.Add(new DialogClick("Cancel"));
            parameters.Add(new DialogClick("Yes"));
            parameters.Add(new DialogClick("No"));
            parameters.Add(new DialogClick("Close"));
            parameters.Add(new DialogClick("Ignore"));
        }

        #region IParametersProvider Members

        public string Name
        {
            get { return "Dialog Click Parameters Provider"; }
        }

        public string Description
        {
            get { return "Provides button options for dialog box click"; }
        }

        public string ParameterType
        {
            get { return "DialogResults"; }
        }

        public List<IItem> ParameterDataSource
        {
            get { return parameters; }
        }

        public string ParameterDisplayMember
        {
            get { return "The button to click"; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //throw new NotImplementedException();
        }

        #endregion
    }

    public class ServiceParamProvider : IParametersProvider
    {
        private List<IItem> parameters;
        public ServiceParamProvider()
        {
            //Create list of Params here
            parameters = new List<IItem>();
            parameters.add(new GenericItem("Automatic", new object(), "Automatic"));
            parameters.Add(new GenericItem("Manual", new object(), "Manual"));
            parameters.Add(new GenericItem("Disabled", new object(), "Disabled"));
        }

        #region IParametersProvider Members

        public string Name
        {
            get { return "ServiceModes"; }
        }

        public string Description
        {
            get { return "Provides the options to change a Windows Service Mode"; }
        }

        public string ParameterType
        {
            get { return "ServiceModes"; }
        }

        public List<IItem> ParameterDataSource
        {
            get { return parameters; }
        }

        public string ParameterDisplayMember
        {
            get { return "Service Modes"; }
        }

        public bool HasOptions
        {
            get { return false; }
        }

        public void ShowOptions()
        {
            //throw new NotImplementedException();
        }

        #endregion
    }
}
